<template>
   <div class="container">
        <div class="toolbar">
            <button @click="go('/home')">首页</button>
            <button @click="go('/about')">关于我们</button>
        </div>
        <div>
            <router-view></router-view>
        </div>
    </div>
</template>
<script lang='ts' setup>
import {useRouter} from 'vue-router'
const router=useRouter()
const go=(arg:string)=>{
   //router.push(arg)
    router.replace(arg)
}
</script>
<style lang='scss' scoped>
.toolbar{

    display: flex;
    justify-content: space-around;
}
.container{
    // width: 500px;
    // height: 300px;
    border: 1px solid #ccc;
    padding: 20px;
}
</style>